import request from '@/utils/request'

//给专辑打分 
export function scoring(score) {
    return request({
        url: `/album/scoring`,
        method: 'post',
        data: score
    })
}
//查询评分
export function getScore(fanId, albumId) {
    return request({
        url: `/album/getScore/${fanId}/${albumId}`,
        method: 'get'
    })
}

//更新专辑
export function updateAlbum(album) {
    return request({
        url: `/album/update`,
        method: 'put',
        data: album
    })
}

//根据id查询专辑
export function getAlbum(id) {
    return request({
        url: `/album/getAlbum/${id}`,
        method: 'get'
    })
}

//添加专辑
export function addAlbum(album) {
    return request({
        url: `/album/add`,
        method: 'post',
        data: album
    })
}

//删除专辑
export function deleteAlbum(id) {
    return request({
        url: `/album/delete/${id}`,
        method: 'delete'
    })
}

//分页条件查询
export function getAlbumListPage(userId, page, size, albumQuery) {
    return request({
        url: `/album/getAlbumListPage/${userId}/${page}/${size}`,
        method: 'get',
        params: albumQuery
    })
}